package user

import (
	"fmt"
)

type Repository interface {
	FindAll() ([]User, error)
	Save(user User) error
}

type userRepository struct {
	// 数据库连接等依赖
}

func NewRepository() Repository {
	return &userRepository{}
}

func (ur *userRepository) FindAll() ([]User, error) {
	// 实现查询所有用户逻辑
	return []User{}, nil
}

func (ur *userRepository) Save(user User) error {
	// 实现保存用户逻辑
	fmt.Println("User saved:", user)
	return nil
}
